﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace PH.Web.Management
{
    public class Common
    {
        public static log4net.ILog Logger
        {
            get
            {
                return log4net.LogManager.GetLogger("PHLogger");
            }
        }
        /// <summary>
        /// 登陆时用的验证码
        /// </summary>
        //public static string CheckCode
        //{
        //    get
        //    {
        //        return (string)MicroSchool.Web.WebContext.CurrentContext.Session["LoginCheckCode"];
        //    }
        //    set
        //    {
        //        MicroSchool.Web.WebContext.CurrentContext.Session["LoginCheckCode"] = value;
        //    }
        //}
        /// <summary>
        /// 抛出http异常
        /// </summary>
        /// <param name="code"></param>
        public static void ThrowHttpException(int code)
        {
            throw new HttpException(code, "");
        }
    }
}